i2c: mv_i2c.c: Validate read length in I2C command
authorjinghua <[email protected]>
Fri, 16 Sep 2016 13:07:54 +0000 (15:07 +0200)
committerHeiko Schocher <[email protected]>
Mon, 26 Sep 2016 08:42:56 +0000 (10:42 +0200)
commit85f03f0ea8532498d0fbae0749c23ee85e181322
tree02eac1dea8d25c69ae5433cdc667d7ae9b12a0f5
parent9ad5a00712fd1a75b047eca76d9ebaa76609ca11
i2c: mv_i2c.c: Validate read length in I2C command

The I2C bus will get stuck when reading 0 byte. So we add validation of
the read length in i2c_read(). This issue only occurs on read operation.

Signed-off-by: jinghua <[email protected]>
Signed-off-by: Stefan Roese <[email protected]>
Cc: Nadav Haklai <[email protected]>
Cc: Kostya Porotchkin <[email protected]>
Cc: Wilson Ding <[email protected]>
Cc: Victor Gu <[email protected]>
Cc: Hua Jing <[email protected]>
Cc: Terry Zhou <[email protected]>
Cc: Hanna Hawa <[email protected]>
Cc: Haim Boot <[email protected]>
Cc: Heiko Schocher <[email protected]>
drivers/i2c/mv_i2c.c